package com.forum.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
// 回复实体类
public class Posts {

    private Long id;
    // 帖子id
    private Long threadId;
    // 用户id
    private Long userId;
    // 帖子内容
    private String content;
    // 创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    // 引用上次的回复
    private Long parentPostId;
}
